#ifndef _MCU_ADC_H_
#define _MCU_ADC_H_


#include "..\C51_KEIL\typedef.h"


// APIs

#define Adc_GetFullValue()      4095

#define Adc_SetCh(ch)    \
    {                    \
        ADCCON0 &= 0XF0; \
        ADCCON0 |= ch;   \
    } //切换通道

#define Adc_Disable() ADCCON1 &= 0xFE

#define Adc_Enable() ADCCON1 |= 0x01

#define Adc_Start() ADCS = 1

void Adc_Init();

u16 Adc_GetOnce(u8 ch);

u16 Adc_GetValue(u8 ch);



#endif


